//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class SupplementalFont : IOfficeXmlSerializable
    {
        private string script;
        private string typeface;

        public string Typeface
        {
            get { return typeface; }
            set { typeface = value; }
        }

        public string Script
        {
            get { return script; }
            set { script = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (var c = context.Read("font"))
            {
                Typeface = c.GetOptionalString("typeface");
                Script = c.GetOptionalString("script");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("font"))
            {
                c.SetOptionalString("script", Script);
                c.SetOptionalString("typeface", Typeface);
            }
        }

        #endregion
    }
}